Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(storybook): documentation migration #3125

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

castastrophe
Copy link
Collaborator

@castastrophe castastrophe commented Sep 17, 2024

Description

Migrate docs site building to leverage Storybook. This PR:

  • Updates build tooling and yarn commands
  • Updates GitHub Actions to target the storybook build as the documentation site
  • Removes the *.yml assets from components
  • Removes the site package from the project
  • Removes the @spectrum-css/site package as legacy styles
  • Migrates all assets to .storybook/assets

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

  • (@rise-erpelding) Pull down the branch and run yarn build:docs locally. Open the /dist/index.html file in the local dev server provided by VSCode. Expect to see a production build of the Storybook site with only docs pages.
  • Expect the landing page for the docs site to show the developer build of Storybook (with demo pages)

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

@castastrophe castastrophe added the skip_vrt Add to a PR to skip running VRT (but still pass the action) label Sep 17, 2024
@castastrophe castastrophe self-assigned this Sep 17, 2024
Copy link

changeset-bot bot commented Sep 17, 2024

⚠️ No Changeset found

Latest commit: 3df5e15

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Sep 17, 2024

🚀 Deployed on https://pr-3125--spectrum-css.netlify.app

Copy link
Contributor

github-actions bot commented Sep 17, 2024

File metrics

Summary

Total size: 4.26 MB*
Total change (Δ): 🟢 ⬇ 42.77 KB (-0.97%)

Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.

Package Size Δ
site 🚨 deleted/moved 🟢 ⬇ 14.26 KB

Details

site

Filename Head Compared to base
index-base.css - 🟢 ⬇ 14.26 KB (-100.00%)
index-vars.css - 🟢 ⬇ 14.26 KB (-100.00%)
index.css - 🟢 ⬇ 14.26 KB (-100.00%)
* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from af4fc4c to af64ca9 Compare September 19, 2024 20:17
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from af64ca9 to 3c6c77a Compare September 26, 2024 23:11
@castastrophe castastrophe added the blocked See description and comments for what is blocking this issue label Sep 30, 2024
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch 2 times, most recently from 224392f to 4e76087 Compare October 11, 2024 14:19
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch 4 times, most recently from 9879d72 to 39ff53a Compare October 23, 2024 18:16
@castastrophe castastrophe marked this pull request as ready for review October 23, 2024 18:17
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from 39ff53a to e188c69 Compare October 23, 2024 18:56
@castastrophe castastrophe added documentation Because documentation is important and shouldn't be broken size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. storybook and removed blocked See description and comments for what is blocking this issue labels Oct 23, 2024
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from e188c69 to 7a92752 Compare October 23, 2024 21:09
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Storybook appears to be working fine locally and in running the production build. I left a couple of questions/thoughts and am also noting that yarn dev locally is giving me an error message, do we still need it for anything or can it be safely removed?

.github/workflows/development.yml Show resolved Hide resolved
components/README.md Show resolved Hide resolved
Copy link
Member

@cdransf cdransf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nothing concerning jumps out at me.

Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, I'm so excited for this! ✨✨✨

I have a few questions for you.

  • I believe we still have a buttongroup.yml file- do we still need that for any particular reason or should it be deleted?
  • I think we all started a thread in Slack, but I'm curious as to why the production build of Storybook won't have the stories any more. I very well may have missed the discussion and that was the plan all along (I guess I assumed that we were just adding all of our documentation from the docs site to the Storybook). It just caught me off guard that there weren't going to be stories and controls.

components/README.md Outdated Show resolved Hide resolved
.storybook/guides/deprecation.mdx Outdated Show resolved Hide resolved
.storybook/guides/deprecation.mdx Show resolved Hide resolved
README.md Show resolved Hide resolved
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from 32847e6 to e3c6ad6 Compare October 28, 2024 12:50
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from e3c6ad6 to 1c94841 Compare October 28, 2024 13:00
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from 1c94841 to 2cec710 Compare October 28, 2024 17:06
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from 2cec710 to 288394f Compare October 28, 2024 20:09
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from 288394f to 79de389 Compare October 29, 2024 14:44
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch 4 times, most recently from 3a46b2a to 189c57d Compare November 1, 2024 19:12
@castastrophe
Copy link
Collaborator Author

@marissahuysentruyt Good catch with the buttongroup.yml file. I got that removed and after our team discussion, removed the "docs-only" flag for the build.

@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from 189c57d to a4cb389 Compare November 4, 2024 15:13
@jawinn jawinn self-requested a review November 4, 2024 20:08
@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from a4cb389 to 556ec56 Compare November 4, 2024 20:12
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So exciting! Thanks for tackling all of this work!

Copy link
Collaborator

@jawinn jawinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good! I only have two questions before approval:

  1. Does the site/package.json file also need to be removed, now that everything else in there is deleted?
  2. I looked around for any leftover references to the preview URL and saw that there are several references to dist/preview in the .storybook/project.json; do any of those need adjustment or are they fine as-is?

@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from 556ec56 to f15127f Compare November 5, 2024 14:06
@castastrophe
Copy link
Collaborator Author

  1. Does the site/package.json file also need to be removed, now that everything else in there is deleted?

Good catch! Probably was resurrected during a rebase with main.

  1. I looked around for any leftover references to the preview URL and saw that there are several references to dist/preview in the .storybook/project.json; do any of those need adjustment or are they fine as-is?

Thank you! I've updated these to point to dist now.

@castastrophe castastrophe force-pushed the feat-documentation-migration-storybook branch from f15127f to 3df5e15 Compare November 5, 2024 14:12
@castastrophe castastrophe merged commit 5358f5a into main Nov 5, 2024
12 checks passed
@castastrophe castastrophe deleted the feat-documentation-migration-storybook branch November 5, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Because documentation is important and shouldn't be broken s1 size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. skip_vrt Add to a PR to skip running VRT (but still pass the action) storybook
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants